using System;
using System.Collections;
using System.Xml.Serialization;

namespace VPLink.WebParts
{
	/// <summary>
	/// Summary description for taSPListView.
	/// </summary>
	[XmlRootAttribute("ListView", IsNullable = false)]
	public class taSPListView
	{
		[XmlAttributeAttribute]
		public string Name;
		[XmlAttributeAttribute]
		public string Url;

		public taSPListView()
		{
	
		}

		public void AddField(string Name, string Type, string Value, string Width, string Align)
		{
			taSPField field = new taSPField();
			field.Name = Name;
			field.Type = Type;
			field.Value = Value;
			field.Width = Width;
			field.Align = Align;
			mFieldList.Add(field);
		}
		private ArrayList mFieldList = new ArrayList();
		[XmlArrayAttribute("Fields")]
		[XmlArrayItemAttribute(ElementName = "Field", 
			 IsNullable = true,
			 Type = typeof(taSPField))]
		public ArrayList FieldList
		{
			get	
			{
				return mFieldList;
			}
			set 
			{
				mFieldList = value;
			}
		}	
	}
}
